<template>

  <div class="reportFormPage">
    <topOperation />
    <div id="domid">
      <el-row>
        <el-col :span="5" :offset="19">
          <div class="pageNumBox">第 1 页，共 1 页</div>
        </el-col>
      </el-row>
      <div class="topTwoBox">
        <div class="centerName">水泥标准稠度用水量、凝结时间、安定性试验检测记录表</div>
        <div class="codeText">JGLQ04003<br>JGLQ04004<br>JGLQ04005</div>
      </div>
      <div class="threeTopBox">
        <div class="threeItem1">检测单位名称：</div>
        <div class="threeItem2">
          山东高速路桥工程试验检测有限公司
        </div>
        <div class="threeItem3">
          记录编号：JL-JGT-LJ5-050-1
        </div>
      </div>
      <!------------------------------表头-------------------------->
      <table border="1" height="110px" bordercolor="#000000" cellpadding="2" cellspacing="0" align="center">
        <tbody>
        <tr>
          <td height="25" align="center" width="15%">工程名称</td>
          <td style="word-wrap: break-word; word-break :break-all;" colspan="3" bgcolor="#ffffff">
            <el-input type="text" v-model="oneTableData.a"
                      style="border-width:0px;height:100%;width:100%;text-align:left;" />
          </td>
        </tr>
        <tr>
          <td height="25" align="center">工程部位/用途</td>
          <td style="word-wrap: break-word; word-break :break-all;" colspan="3" bgcolor="#ffffff">
            <el-input type="text" v-model="oneTableData.a"
                      style="border-width:0px;height:100%;width:100%;text-align:left;" />
          </td>
        </tr>
        <tr>
          <td height="25" align="center">样品信息</td>
          <td style="word-wrap: break-word; word-break :break-all;" bgcolor="#ffffff" colspan="3">
            <div style="width:100%;background-color:white;">样品名称：普通硅酸盐水泥；样品编号：YP(DL)-2024-SNJ-001；样品数量：20kg；<br>样品状态： 灰色，干燥、无结块；来样时间：2024年01月14日 </div>
          </td>
        </tr>
        <tr>
          <td height="25" align="center">试验检测日期</td>
          <td bgcolor="#ffffff">
            <div style="width:218px;background-color:white;word-wrap: break-word; word-break :break-all;">2024-01-15～2024-01-16</div>
          </td>
          <td align="center">试验条件</td>
          <td bgcolor="#ffffff">
            <el-input type="text" v-model="oneTableData.b" style="border-width:0px;height:100%;width:100%;text-align:left;" />
          </td>
        </tr>
        <tr>
          <td height="25" align="center">检测依据</td>
          <td bgcolor="#ffffff">
            <div style="width:218px;background-color:white;word-wrap: break-word; word-break :break-all;">JTG
              3430-2020
            </div>
          </td>
          <td align="center">判定依据</td>
          <td bgcolor="#ffffff">
            <el-input type="text" v-model="oneTableData.b"
                      style="border-width:0px;height:100%;width:100%;text-align:left;" />
          </td>
        </tr>
        <tr>
          <td height="30" align="center">主要仪器设备<br>名称及编号</td>
          <td colspan="3" bgcolor="#ffffff">
            <div style="width:100%;background-color:white;">
              □水泥净浆搅拌机/SN-01、□维卡仪/SN-03、□电子天平/SN-34、 □雷氏夹测定仪/SN-07、□沸煮箱/SN-05等</div>
          </td>
        </tr>

        </tbody>
      </table>
      <!-------------------------------------------------------->
      <table cellpadding="1" cellspacing="0" bordercolor="#000000"
             style="border-right: 2px solid black; border-top: none; border-left: 2px solid black; border-bottom: 2px solid black; border-collapse: collapse;  height: 100px; text-align: center;"
             align="center" border="1" tbindex="0">
        <tbody>
          <tr height="30">
            <td width="5%"  rowspan="3">标准稠度用水量</td>
            <td width="10%">测定方法</td>
            <td width="85%" colspan="4">标准法</td>

          </tr>
          <tr height="40">
            <td width="20%" colspan="2">试样质量<br>(g)</td>
            <td width="20%">加水量<br>(ml)</td>
            <td width="30%">试杆下沉距底部距离<br>(mm)</td>
            <td width="25%">标准稠度用水量<br>(%)</td>
          </tr>
          <tr height="40">
            <td width="20%" colspan="2">1</td>
            <td width="20%">2</td>
            <td width="30%">3</td>
            <td width="25%">4</td>
          </tr>
        </tbody>
      </table>
      <!-------------------------------------------------------->
      <table cellpadding="1" cellspacing="0" bordercolor="#000000"
             style="border-right: 2px solid black; border-top: none; border-left: 2px solid black; border-bottom: 2px solid black; border-collapse: collapse;  height: 200px; text-align: center;"
             align="center" border="1" tbindex="0">
        <tbody>
          <tr height="30">
            <td width="5%" rowspan="6">凝结时间</td>
            <td width="20%" colspan="3">测定方法</td>
            <td width="20%" colspan="3">标准法</td>
            <td width="30%" colspan="4">开始加水时间(h:min)</td>
            <td width="25%" colspan="3">c</td>
          </tr>
          <tr height="60">
            <td width="5%" rowspan="2">初凝测定</td>
            <td width="10%">测试<br>时间<br>(h:min)</td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>

          </tr>
          <tr height="60">
            <td>试杆距底<br>板距离<br>(mm)</td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
          </tr>
          <tr height="60">
            <td rowspan="2">终凝测定</td>
            <td >测试<br>时间<br>(h:min)</td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
          </tr>
          <tr height="60">
            <td>有无环形</td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
          </tr>
          <tr height="40">
            <td width="20%" colspan="3">初凝时间（min）</td>
            <td width="20%" colspan="3">F-C</td>
            <td width="30%" colspan="4">终凝时间（min）</td>
            <td width="25%" colspan="3">I-C</td>

          </tr>
        </tbody>
      </table>
      <!-------------------------------------------------------->
      <table cellpadding="1" cellspacing="0" bordercolor="#000000" width="100%"
             style="border-right: 2px solid black; border-top: none; border-left: 2px solid black; border-bottom: 2px solid black; border-collapse: collapse;  height: 200px; text-align: center;"
             align="center" border="1" tbindex="0">
        <tbody>
        <tr height="30">
          <td width="5%" rowspan="7">安<br>定<br>法</td>
          <td width="5%" rowspan="3">试<br>饼<br>法</td>
          <td>制件日期</td>
          <td>测定日期</td>
          <td colspan="4">试件蒸煮/压蒸前后情况</td>
          <td>测定结果</td>
        </tr>
        <tr height="30">
          <td rowspan="2"></td>
          <td rowspan="2"></td>
          <td colspan="4"></td>
          <td rowspan="2"></td>
        </tr>
        <tr height="30">
          <td colspan="4"></td>
        </tr>
        <tr  height="30">
          <td width="5%" rowspan="4">雷<br>试<br>法</td>
          <td rowspan="2">制件日期</td>
          <td rowspan="2">测定日期</td>
          <td rowspan="2">A值（mm）</td>
          <td rowspan="2">C值（mm）</td>
          <td colspan="2">C-A值（mm）</td>
          <td rowspan="2">测定结果</td>

        </tr>
        <tr height="30">
          <td>单值</td>
          <td>平均值</td>

        </tr>
        <tr height="30">
          <td rowspan="2"></td>
          <td rowspan="2"></td>
          <td>A</td>
          <td>B</td>
          <td>B-A</td>
          <td rowspan="2"></td>
          <td rowspan="2"></td>
        </tr>
        <tr height="30">
          <td></td>
          <td></td>
          <td></td>
        </tr>
        </tbody>
      </table>
      <!-------------------------------------------------------->
      <table cellpadding="1" cellspacing="0" bordercolor="#000000" width="100%"
             style="border-right: 2px solid black; border-top: none; border-left: 2px solid black; border-bottom: 2px solid black; border-collapse: collapse;  height: 60px; text-align: center;"
             align="center" border="1" tbindex="0">
        <tbody>
        <tr height="60">
          <td width="100%" align="left" valign="top">附加声明：</td>
        </tr>
        </tbody>
      </table>
      <!---------------------------------------------------------------------->
      <table border="0" cellpadding="0" cellspacing="0" align="center"
             style="width: 100%; border-collapse:collapse;height:22px;">
        <tbody>
        <tr>
          <td width="10%" align="right">检测：</td>
          <td width="15%" align="left"></td>
          <td width="10%" align="right">审核：</td>
          <td width="15%" align="left"></td>
          <td width="10%" align="right">批准：</td>
          <td align="left" width="15%"></td>
          <td width="10%">日期：</td>
          <td align="left" width="15%">
            <el-input type="text" v-model="dateText" :readonly="readonly" style="height:20px;width:110px;" />
          </td>
        </tr>
        </tbody>
      </table>
    </div>
  </div>
</template>

<script>
import { listSnbzjcjlbBsInfo, getSnbzjcjlbBsInfo, delSnbzjcjlbBsInfo, addSnbzjcjlbBsInfo, updateSnbzjcjlbBsInfo } from "@/api/report_sn/snbzjcjlbBsInfo";
import topOperation from "@/views/reportForms/components/topOperation";

export default {
  name: "SnbzjcjlbBsInfo",
  data() {
    return {
      oneTableData: {
        a: 'K39+820-K40+440原地面',
        b: 'JTG/T 3610-2019',
        c: '2022年03月09日',
        d: 'K40 + 406',
        e: '/',
      },
      twoTableData: {
        a1: '＜5',
        a2: '重型II - 1',
        a3: '997',
        a4: '4.5',
        a5: '40',
        a6: '/',
        a7: '/',
        a8: '/',
        a9: '7.8',
        a10: '9.6',
        a11: '11.8',
        a12: '14.2',
        a13: '16.5',
        a14: '/',
        a15: '1.75',
        a16: '1.86',
        a17: '1.89',
        a18: '1.85',
        a19: '1.75',
        a20: '/',
        a21: '7.6',
        a22: '9.4',
        a23: '11.6',
        a24: '14.8',
        a25: '16.6',
        a26: '/',
        a27: '1.73',
        a28: '1.84',
        a29: '1.89',
        a30: '1.82',
        a31: '1.74',
        a32: '/',
        a33: '11.6',
        a34: '1.89',
        a35: '11.5',
        a36: '1.89',
        a37: '11.7',
        a38: '1.89',
      },
      fjsm: '附加声明：/',
      dateText: '2024年05月10日',
      readonly: false,
      // 按钮loading
      buttonLoading: false,
      // 遮罩层
      loading: true,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 水泥标准稠度用水量、凝结时间、安定性试验检测记录表格数据
      snbzjcjlbBsInfoList: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        jiancdwmc: undefined,
        jilbh: undefined,
        yangpmc: undefined,
        yangpbh: undefined,
        yangpzt: undefined,
        riq: undefined,
      },
      // 表单参数
      form: {},
      // 表单校验
      rules: {
      }
    };
  },
  created() {
    this.getList();
  },
  components: {
    topOperation
  },
  methods: {
    /** 查询水泥标准稠度用水量、凝结时间、安定性试验检测记录列表 */
    getList() {
      this.loading = true;
      listSnbzjcjlbBsInfo(this.queryParams).then(response => {
        this.snbzjcjlbBsInfoList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    // 取消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // 表单重置
    reset() {
      this.form = {
        excelId: undefined,
        page: undefined,
        totalPage: undefined,
        jiancdwmc: undefined,
        jilbh: undefined,
        gongcbwyt: undefined,
        yangpmc: undefined,
        yangpbh: undefined,
        yangpsl: undefined,
        yangpzt: undefined,
        yangpsj: undefined,
        shiyjcrq: undefined,
        shiytjwd: undefined,
        shiytjsd: undefined,
        jiancyj: undefined,
        pandyj: undefined,
        zhuyyqsbmcjbh: undefined,
        biaozcdyslsyzl: undefined,
        biaozcdysljsl: undefined,
        biaozcdyslsgxcdbjl: undefined,
        biaozcdyslbzcdysl: undefined,
        ningjsjksjssj: undefined,
        ningjsjcncd: undefined,
        ningjsjzncd: undefined,
        ningjsjcnsj: undefined,
        ningjsjznsj: undefined,
        andxsbf: undefined,
        andxlsf: undefined,
        fujsm: undefined,
        jianc: undefined,
        jil: undefined,
        fuh: undefined,
        riq: undefined,
        delFlag: undefined,
        createBy: undefined,
        createTime: undefined,
        updateBy: undefined,
        updateTime: undefined
      };
      this.resetForm("form");
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map(item => item.excelId)
      this.single = selection.length!==1
      this.multiple = !selection.length
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.reset();
      this.open = true;
      this.title = "添加水泥标准稠度用水量、凝结时间、安定性试验检测记录";
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.loading = true;
      this.reset();
      const excelId = row.excelId || this.ids
      getSnbzjcjlbBsInfo(excelId).then(response => {
        this.loading = false;
        this.form = response.data;
        this.open = true;
        this.title = "修改水泥标准稠度用水量、凝结时间、安定性试验检测记录";
      });
    },
    /** 提交按钮 */
    submitForm() {
      this.$refs["form"].validate(valid => {
        if (valid) {
          this.buttonLoading = true;
          if (this.form.excelId != null) {
            updateSnbzjcjlbBsInfo(this.form).then(response => {
              this.$modal.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            }).finally(() => {
              this.buttonLoading = false;
            });
          } else {
            addSnbzjcjlbBsInfo(this.form).then(response => {
              this.$modal.msgSuccess("新增成功");
              this.open = false;
              this.getList();
            }).finally(() => {
              this.buttonLoading = false;
            });
          }
        }
      });
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      const excelIds = row.excelId || this.ids;
      this.$modal.confirm('是否确认删除水泥标准稠度用水量、凝结时间、安定性试验检测记录编号为"' + excelIds + '"的数据项？').then(() => {
        this.loading = true;
        return delSnbzjcjlbBsInfo(excelIds);
      }).then(() => {
        this.loading = false;
        this.getList();
        this.$modal.msgSuccess("删除成功");
      }).catch(() => {
      }).finally(() => {
        this.loading = false;
      });
    },
    /** 导出按钮操作 */
    handleExport() {
      this.download('syrw/snbzjcjlbBsInfo/export', {
        ...this.queryParams
      }, `snbzjcjlbBsInfo_${new Date().getTime()}.xlsx`)
    }
  }
};
</script>

<style scoped lang="scss">
@import url('../../reportForms/style/reportForm.scss');
</style>
